Skip to content

Comments

Add serializers and deserializers for Jupyter's default websocket protocol#3

Merged
teeler merged 8 commits intomainfrom
ws-protocol
Jan 30, 2026
Merged

Add serializers and deserializers for Jupyter's default websocket protocol#3
teeler merged 8 commits intomainfrom
ws-protocol

Conversation

@wh1ter4bb1t-js
Copy link
Member

protocol

* Adds a default serializer/deserializer
	- Logic unabashedly swiped from https://github.com/jupyterlab/jupyterlab/blob/main/packages/services/src/kernel/serialize.ts#L216
* Sets default values for the protocol as DEFAULT since it's... the
  default
* Adds simple testing for the serializers/deserializers
* Fixes minor bug with the logger being angry about multiple channels
  being defined
@wh1ter4bb1t-js wh1ter4bb1t-js requested a review from teeler January 26, 2026 18:56
Copy link

@teeler teeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strong feelings about keeping V1 as the default (i suspect upstream will want to keep it that way)

Otherwise curious about your thoughts in keeping JSON/"COLAB" around as an explicit protocol

Copy link
Member Author

@wh1ter4bb1t-js wh1ter4bb1t-js left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review

Copy link

@teeler teeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lookin good!

@teeler
Copy link

teeler commented Jan 29, 2026

i jumped infront with the uv.lock file so you'll need to fix that first :/ but then let's check this bad boy in

@teeler
Copy link

teeler commented Jan 29, 2026

@echarles fyi - we added proper support for the 'default' protocol here. My colleague has uncovered some interesting default behavior in Jupyter - that there is a 'json' fallback parser iff the opcode is text (which happens implicitly when there are no binary buffers being sent)

@echarles
Copy link

@teeler Thas sounds like a good move. I may have a general question on how we can align our efforts.

eg. I have opened datalayer#35 to backport your first change. I can also backport this one, but at some point we may diverge as I may have more questions on #2

How do you see the future of this fork?

@teeler teeler merged commit f18e982 into main Jan 30, 2026
3 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants